import { login } from '@/api/login'
export default {
    namespaced: true,
    state: {
        user: {},
    },
    getters: {
    },
    mutations: {
        login(state, payload) {
            state.user = payload;
        },
    },
    actions: {
        async asyncLogin(context, params) {
            const res = await login(params);
            context.commit('login', res.data.userInfo);
        }
    },
}